package com.wxh;/**
 * Created by wuxuehua on 17-4-18.
 */

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

public class Test extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws IOException {

        AnchorPane anchorPane = new AnchorPane();
        anchorPane.getChildren().add(new Button("测试button"));
        anchorPane.setPrefHeight(400);
        ImageView imageView = new ImageView(new Image("/com/wxh/2222.jpg"));
        imageView.setFitWidth(200);
        imageView.setFitHeight(150);
        imageView.setTranslateX(100);
        imageView.setTranslateY(100);
        anchorPane.setPrefWidth(500);
        primaryStage.setScene(new Scene(anchorPane));
        primaryStage.show();

    }
}
